package com.NetSunWeiQin.chapter06.echoServer;

import java.net.*;


/**
 * 协议处理器，主要负责创建与协议相关的URLConnection对象 ;
 * 这里创建  EchoURLConnection 对象
 *
 * */
public class EchoURLStreamHandler extends URLStreamHandler {


    public int getDefaultPort() {
        return 8000;
    }

    protected URLConnection openConnection(URL url) {
        return new EchoURLConnection(url);
    }
}


